#ifndef GEL_DIB24_HEADER
#define GEL_DIB24_HEADER

class CDIB24
{
public:

	CDIB24();
	CDIB24(const CSize &size);
	~CDIB24();

	void allocMemory();
	void releaseMemory();
	bool isMemAllocated() const;

	int	  getWidth() const;
	int   getHeight() const;
	CSize getSize() const;

	void updateBitmapHeader(const CSize& size);

	const BYTE* getData() const;
		  BYTE* getData();

	bool loadFromBMP(const std::string &strFName);


	void draw(CDC *pDC, const CRect &srcRect,
						const CRect &dstRect) const;

	const BITMAPINFOHEADER& getBitmapHeader() const;
	      BITMAPINFOHEADER& getBitmapHeader();

private:
	bool readBMP(std::ifstream &istream);

private:
	BYTE*            m_pData;
	BITMAPINFOHEADER m_bitmHeader;
};


#endif //#ifndef GEL_DIB24_HEADER